package edu.api.system_api;

import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;
import java.util.Scanner;

public class Demo {

    public static void main(String[] args) throws IOException {
        //获取标准输出流
        PrintStream out = System.out;
        out.println("xxxxxx");
        System.out.println("xxxxxxx");
        //获取标准输入流
        InputStream inputStream = System.in;
        Scanner scanner = new Scanner(inputStream);
        //以标准错误输出流打印
        System.err.println("+++++++++++++++");

        System.out.println("请输入字符，按回车键结束输入:");
        int c;
        //根据标准输入流读取数据
        int i = System.in.read();
        System.out.println("i = " + (char)i);
        //获取系统时间  （毫秒值）
        long timeMillis = System.currentTimeMillis();
        System.out.println("timeMillis = " + timeMillis);
        long nanoTime = System.nanoTime();   //纳秒
        System.out.println("nanoTime = " + nanoTime);
    }

}
